package book;

public class BookList {
    public Book[] bookList = new Book[10];
    public int setUsedSize;
    private int usedSize;

    public BookList(){
        bookList[0]=new Book("三国演义","罗贯中",18,"小说");
        bookList[1]=new Book("红楼梦","吴承恩",28,"小说");
        bookList[2]=new Book("水浒传","施耐庵",38,"小说");
        this.usedSize=3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    //把书放到pos位置
    public void setBookList(int pos,Book book){
        bookList[pos] = book;
    }
    //获取pos位置的书
    public Book getBook(int pos){
        return bookList[pos];
    }
    //
}
